
{% extends 'base_main.html' %}

{% block Meta %}
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
{% endblock %}



{% block content %}
    {% load static %}
<section class="rt_wrap content mCustomScrollbar">
    <div class="rt_content">
        <div class="page_title">
            <h2 class="fl">商品列表</h2>
            <a href="" class="fr top_rt_btn add_icon">添加商品类别</a>
        </div>
        <table class="table">
            <tr>
                <th>缩略图</th>
                <th>类型</th>
                <th>操作</th>
            </tr>

            {% for category in categorys %}

                <tr>
                    <td class="center"><img src="/media/{{ category.category_front_image }}" width="50" height="50" alt="" /></td>
                    <td class="center">
                        {% for type in types %}
                            {% ifequal type.0 category.category_type %}
                              {{ type.0  }} 、{{ type.1 }}
                            {% endifequal %}
                        {% endfor %}

                    </td>
                    <td class="center">
                        <a href="{% url 'goods:goods_category_detail' category.id %}" title="编辑" class="link_icon">&#101;</a>
                    </td>
                </tr>
            {% endfor %}
        </table>
    </div>
</section>
{% endblock %}